from django.db import models

# Create your models here.
from user.models import Staff


class Dealer(models.Model):
    dealer_id = models.CharField(primary_key=True, verbose_name='经销商编号', max_length=32)
    staff = models.ForeignKey(Staff, on_delete=models.DO_NOTHING, db_column='staff_id', blank=True, null=True, verbose_name='职员编号')
    company = models.CharField(max_length=50, blank=True, null=True, verbose_name='公司名称')
    address = models.CharField(max_length=50, blank=True, null=True, verbose_name='公司地址')
    name = models.CharField(max_length=20, blank=True, null=True, verbose_name='负责人')
    phone = models.CharField(max_length=11, blank=True, null=True, verbose_name='联系电话')
    area = models.CharField(max_length=50, blank=True, null=True, verbose_name='公司地址')
    level = models.CharField(max_length=20, blank=True, null=True, verbose_name='等级')
    status = models.CharField(max_length=20, blank=True, null=True, verbose_name='状态')

    class Meta:
        managed = False
        db_table = 'dealer'
